import request from '@/utils/request'
const baseUrl = '/api/employee-contract'
// 获取员工合同分页列表
export function getPageAPI(params) {
    return request({
        url: `${baseUrl}/getPage`,
        method: 'get',
        params
    })
}

// 获取员工合同详情
export function getInfoApi(id) {
    return request({
        url: `${baseUrl}/getInfo/${id}`,
        method: 'get'
    })
}

// 新增或更新员工合同
export function saveOrUpdateApi(data) {
    return request({
        url: `${baseUrl}/saveOrUpdate`,
        method: 'post',
        data
    })
}

// 批量保存或更新员工合同
export function batchSaveOrUpdateApi(data) {
    return request({
        url: `${baseUrl}/batchSaveOrUpdate`,
        method: 'post',
        data
    })
}

// 删除员工合同
export function removeApi(id) {
    return request({
        url: `${baseUrl}/remove/${id}`,
        method: 'delete'
    })
}

// 批量删除员工合同
export function batchRemoveApi(ids) {
    return request({
        url: `${baseUrl}/batchRemove`,
        method: 'post',
        data: ids
    })
} 